home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / pc / MANCALA.ZIP / README < prev    next >
Encoding:
Text File  |  1994-08-24  |  1.6 KB  |  38 lines

  1. README for Bill's Mancala
  2.  
  3.    OK, I saw Scott Sauyet's post in rec.games.abstract about Mancala and
  4. decided to write a computer program to play against to get a feel for the
  5. game.  I know it sucks, but I played it a few times and it beats me when it
  6. looks ahead two moves so I don't care.
  7.    To compile:
  8. gcc -O2 mancala.c ab.c rnd.c -o mancala
  9.  
  10.    To run:
  11. mancala <player 1 lookahead> <player 2 lookahead>
  12.  
  13.    where lookahead of 0 means a human plays.  Player 1 is the top row,
  14. player 2 is the bottom.  For example.
  15.  
  16. mancala 0 2    means you go first, and the computer looks ahead 2 moves.
  17. mancala 4 0    means you go second, and the computer looks ahead 4 moves.
  18. mancala 3 3    Watch the computer play itself!
  19. mancala 7 1    Watch how badly a smart computer beats a dumb one!
  20.  
  21. ABOUT THE PROGRAM
  22.    ab.c is the alpha-beta search engine.  It doesn't prune or extend the
  23. searches of interesting paths.
  24.    mancala.c is the "hooks" for the search engine and the user interface
  25. (if you can call it that).  To evaluate the worth of a move it just returns
  26. the number of stones you got to put in your scoring pit (you can tell I
  27. didn't try real hard to be clever here).
  28.    rnd.c is a random number generator I had lying around.  I used it to
  29. keep the computer from playing _exactly_ the same moves every game.
  30.  
  31.    Let me know what you think!  But be nice...remember, I only spent an hour
  32. on this.  If I spent two hours it'd be _way_ more impressive.
  33.  
  34.                    -Bill (wms@ssd.intel.com)
  35. PS - It plays the rules as Scott posted them.  They were kind of vague;
  36.      for example, what happens when you have no legal move?  The program
  37.      then forces you to pass.  If you don't like this feel free to change it.
  38.